package util;

import java.io.File;
public class GAConfig {
	public static final int MAX_BR = 2000;
	public static final int MAX_ST = 2000;

    public static final int TestCaseSize = 60;  /* 200;test length, named from */
    public static final int PopulationSize=50;
    public static final int elitismNumBest=10;//10%
    public static final int TestCaseRandomSize =200;
    public static final int fitnessEvaluation=Integer.MAX_VALUE;
    
    public static final int localSearchNum=5;
    public static  boolean UseReadWrietRelation=true;
    public static  boolean useConstantSeeding=true;// remove only one writing method at each time when local search adds a method.
    //Returns how many variables there are for the CUT type --- References
    public static final int NumVarCut=2;
 
   // @Option("Use only public classes/methods")
    public static boolean public_only = true;
   
	public static float SET_TO_NULL = 0.05f;
    
  
   public static final float crossoverRate=0.8f;
    public static final float mutationRate=0.9f;
    
    public static final boolean PrintPopulation=false;
   
    public static final boolean  generateNewPopulation=false;
    public static final boolean SaveData=true;
    public static final boolean Silent=false;
    // Dependences Methods Parameters
//	public static boolean useMethodsDependinecies = false;
	
    
    //Crossover
public static final String CrossoverStrategy="crossover.SingleCrossOver";
//public static final String CrossoverStrategy="crossover.SingleRandomCrossOver";


//public static String		classFilePath="C:/MAMDA/NanoXML/CUT.txt";
//public static String		classFilePath="C:/MAMDA/JodaTime/CUT.txt";
//public static String		classFilePath="C:/MAMDA/MAMDA/roops/CUT.txt";
//public static String		classFilePath="c:/MAMDA/MAMDA/TestClasses/StringTkoenizer.txt";
//public static String		classFilePath="c:/MAMDA/MAMDA/TestClasses/Fraction.txt";
//public static String		classFilePath="./ContainerClasses/BinomialHeap.txt";Fraction
//public static String		classFilePath="./ContainerClasses/TreeMap/TreeMap.txt";
//public static String		classFilePath="./ContainerClasses/AvlTree/AvlTree.txt";
public static String		classFilePath="c:/MAMDA/jdom.git/CUT.txt";
//public static String		classFilePath="c:/MAMDA/MAMDA/TestClasses/Stack/Stack.txt";//StringTokenizer



	/** the base directory (e.g. $HOME/workspace/project/ ) */
	private static File dirBase;

	/** source directory */
	private static File dirSource;

	/** directory with classes compiled by the user */
	private static File dirCompiled;

	/** directory with classes instrumented */
	private static File dirInstrumented;
	private static String algorithmName;
	public static void setAlgorithmName(String algName) {
		algorithmName=algName;
	}
	public static String getAlgorithmName() {
		return algorithmName;
	}

	public static void ConfigProject() {
		dirBase = new File(".");
		dirSource = new File("src");
		dirCompiled = new File("bin");
		dirInstrumented = new File("instrumented");

	}
	public static File getDirInstrumented() {
		ConfigProject();
		dirInstrumented = new File(dirBase, dirInstrumented.getPath()).getAbsoluteFile();
		return dirInstrumented;
	}
	public static File getDirCompiled() {
		ConfigProject();
		if(!dirCompiled.isAbsolute()) dirCompiled = new File(dirBase, dirCompiled.getPath()).getAbsoluteFile();
		return dirCompiled;
	}

}
